package com.kevin.spider.controller;

import com.kevin.spider.service.SpiderTaoBaoService;
import com.ruoyi.common.core.domain.AjaxResult;
import jakarta.annotation.Resource;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author 张帆
 * @date 2025/6/17 8:50
 */
@RestController
@RequestMapping("/shop/spider")
public class SpiderController {
    @Resource
    private SpiderTaoBaoService spiderTaoBaoService;

    /**
     * 查询选品列表
     */
    @PreAuthorize("@ss.hasPermi('shop:selection:spider')")
    @PostMapping
    public AjaxResult spider(@RequestBody List<Long> selectionIds) {
        spiderTaoBaoService.spiderTaoBao(selectionIds);
        return AjaxResult.success();
    }
}
